package cn.signalpha.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 类说明
 *
 * @author signalpha
 */
@Getter
@AllArgsConstructor
public enum StatusEnum {

    /**
     * 关
     */
	OFF(0, "隐藏/关闭"),

    /**
     * 开
     */
    ON(1, "显示/开启");

    private final Integer type;
	private final String name;

	public static StatusEnum instance(Integer type) {
		StatusEnum[] enums = values();
		for (StatusEnum statusEnum : enums) {
			if (statusEnum.getType().equals(type)) {
				return statusEnum;
			}
		}
		return null;
	}
}
